package com.chaos.auth.api.data.oauth;

import com.chaos.framework.model.dto.DTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OauthClientDetailsData", description = "")
public class OauthClientDetailsData extends DTO {

    @NotBlank(message = "clientId不能为空")
    private String clientId;

    private String resourceIds;

    @NotBlank(message = "clientSecret不能为空")
    private String clientSecret;

    private String scope;

    @NotBlank(message = "authorizedGrantTypes不能为空")
    @ApiModelProperty(value = "指定客户端支持的grant_type,可选值包括authorization_code,password,refresh_token,implicit,client_credentials")
    private String authorizedGrantTypes;

    private String webServerRedirectUri;

    private String authorities;

    @NotNull(message = "token有效时长不能为空")
    private Integer accessTokenValidity;

    @NotNull(message = "refreshToken有效时长不能为空")
    private Integer refreshTokenValidity;

    @NotNull(message = "系统名称不能为空")
    private String additionalInformation;

    private String autoapprove;

    private Long tenantId;



}
